package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class BootDemoApplication  extends SpringBootServletInitializer {

	@RequestMapping("boot")
	public String home() {
		return "$$ spring-boot home @@@";
	}
	
	public static void main(String[] args) {
		SpringApplication.run(BootDemoApplication.class, args);
	}
	
	@Override//为了打包springboot项目
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(this.getClass());
	}
	
}
